<?php
	session_start();
	
	$isLogin = false;
	$pos = '';
	if(isset($_GET['user'])){
		$user = $_GET['user'];
		$file = "./users/u_{$user}.txt";
		
		if(file_exists($file)){
			$ctime = filectime($file);
			$timedelay = time() - $ctime;
			if($timedelay < 10){
				$isLogin = true;
				$pos = file_get_contents($file);
			}
		}
	}
	
	echo json_encode(array('status'=>$isLogin, 'pos'=>$pos));
	

	die;